import 'package:flutter/material.dart';

class GoodsEntity with ChangeNotifier{
  String goodsSrc;
  String goodsName;
  String goodsDesc;
  String goodsOldPrice;
  String goodsPrice;
  int _goodsCount = 1;

  GoodsEntity(this.goodsSrc, this.goodsName, this.goodsDesc, this.goodsPrice, this.goodsOldPrice);

  int get getGoodsCount => _goodsCount;

  void add() {
    _goodsCount++;
    notifyListeners();
  }

  void minus() {
    _goodsCount > 1 ? _goodsCount-- : _goodsCount = 1;
    notifyListeners();
  }
}